<?php

/**
 * @author honestphan
 * @copyright 2012
 */
//G?i t?p tin giao di?n trong thu m?c view/theme/template tuong ?ng

defined('DSVH') or die('Restricted access');

include('model/m_home.php');
//include('model/m_webinfo.php');
include('language/lang_lienhe.php');
include('controller/c_thongke.php');
include('controller/c_block.php');

    $heading_title = contact;
    $title = $heading_title;

   if($_POST['title']==""){
        $err['exist'] = chua_nhap_ten;
        $error_name = $err['exist'];
    }
    if($_POST['content']==""){
        $err['exist'] = chua_nhap_ten;
        $error_name = $err['exist'];
    }
    
    if($_POST['email']==""){
        $err['exist'] = chua_nhap_ten;
        $error_name = $err['exist'];
    }
    
    
    if(!$err){
        $valid = true;    
    }
    else{
        $valid = false;
    }
    $link ='index.php?module=lienhe';
    $dagui = "";
   	$list_bangtin = getListbangtin(0,5);
    $info = getwebinfo('lh');
    $map = getwebinfo('map');
    $list_chedosinhhoat = getListchedosinhhoat(0, 5);
    $list_phongnghi = getListphongnghi(0,10);
    if(($_SERVER['REQUEST_METHOD']=='POST')&&$valid)
    {
      
     $_SESSION['dagui'] = send_success;
     $dagui = send_success;
     
     //chuyen huong ve list
     header('LOCATION: '.$link);    
     
    }
    
    require('view/theme/default/template/home/header.tpl'); 
    require('view/theme/default/template/home/left.tpl'); 
    require('view/theme/default/template/lienhe/form.tpl');
    require('view/theme/default/template/home/footer.tpl');    

?>